#ifndef __CLI_PARSE__SHADOWS_H__
#define __CLI_PARSE__SHADOWS_H__

#include "../../Epsilon/Epsilon3D/vector3.h"
#include "render_batch.h" // BatchList


//#define OMNI_DIRECTIONAL
#define DEBUG_SHADOWS
//#define DIFFERENT_FOV
#define ACTORS_CAST_SHADOWS


namespace cli_parse {
  class ShadowCaster {

  };
};

namespace Underlight {
  class Room;
};

void ShadowPass_Build ( Underlight::Room* room,
                        const float&      time,
                        e3dVector3        light_pos );
void ShadowPass_Cast  ( Underlight::Room* room,
                        const float&      time,
                        e3dVector3        light_pos );

void BeginShadows      (e3dVector3 light_pos, Underlight::Room* room);
void EndShadows        (void);
void DrawShadowBatches ( Underlight::Room* room,
                         const float&      time,
                         bool              apply_tex = true,
                         bool              animated  = false );

void BeginShadowPostPass (e3dVector3 light_pos);
void EndShadowPostPass   (void);


void BeginDualShadows        (e3dVector3 light_pos, Underlight::Room* room, int side);
void EndDualShadows          (int side);
void BeginDualShadowPostPass (e3dVector3 light_pos, int side);




void   BeginOmniShadows ( e3dVector3        light_pos,
                          Underlight::Room* room,
                          int               direction = 0 );
void   EndOmniShadows   (int direction);

void   BeginOmniShadowPostPass (e3dVector3 light_pos);

/* TODO: Move this stuff to render.h/cpp or util.h/cpp */
void DrawScreenSpaceQuad   (float scale, float r = 1.0f, float g = 1.0f, float b = 1.0f, float a = 1.0f);
void DrawScreenSpaceQuadEx (GLuint texture, float scale);
void DrawBackground        (int tex, float r = 1.0f, float g = 1.0f, float b = 1.0f, float a = 1.0f);

#endif /* __CLI_PARSE__SHADOWS_H__ */
